<template>
	<view class="calenMoreBox">
		<view class="calenMoreList">
			<view class="calenMoreItem"><CalendarMore :infoData="info"></CalendarMore></view>
		</view>
	</view>
</template>

<script>
import { getauctionGoods } from '@/api/home/home.js';

export default {
	data() {
		return {
			info:{}
		};
	},
	mounted() {
		this.fetchGoodsInfo()
	},
	methods: {
		async fetchGoodsInfo() {
			this.info = [];
			let { data } = await getauctionGoods();
			Object.keys(data).forEach(item => {
				this.info.push({
					title: item,
					list: data[item],
					timeStamp: new Date(item).getTime()
				});
			});
			console.log(data);
			this.info = this.info.sort((a, b) => a.timeStamp - b.timeStamp);
			this.info = this.info.slice(0,1);
		}
	}
		
};
</script>

<style lang="scss">
.calenMoreBox {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100vh;
	background-color: #212121;
}
.calenMoreList {
	margin-top: 21px;
	margin-bottom: 29px;
}
.calenMoreItem {
}
</style>
